package net.sunofbeach.blog.controller;

import net.sunofbeach.blog.response.Result;
import net.sunofbeach.blog.response.ResultEnum;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 错误码转统一返回结果
 *
 * @author bing_  @create 2021/11/30-11:46
 */
@RestController
public class ErrorPageController {

    @GetMapping("/403")
    public Result page403() {
        return Result.build(null, ResultEnum.ERROR_403);
    }


    @GetMapping("/404")
    public Result page404() {
        return Result.build(null, ResultEnum.ERROR_404);
    }

    @GetMapping("/405")
    public Result page405() {
        return Result.build(null, ResultEnum.ERROR_405);
    }

    @GetMapping("/504")
    public Result page504() {
        return Result.build(null, ResultEnum.ERROR_504);
    }

    @GetMapping("/505")
    public Result page505() {
        return Result.build(null, ResultEnum.ERROR_505);
    }
}
